<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<h1>Role LIST</h1>


<a href="<%=request.getContextPath()%>/roles/add"
	class="btn btn-sm btn-primary" data-loading-text="Loading" id="addBtn">新增</a>


<table class="table table-striped table-bordered">
	<tr>
		<th style="width: 120px">功能</th>
		<th>腳色</th>
	</tr>
	<c:forEach items="${roles}" var="item">
		<tr>
			<td><a
				href="<%=request.getContextPath()%>/roles/edit?id=${item.id}"
				class="btn btn-sm btn-success" data-loading-text="Loading"
				id="editBtn">編輯</a> <a
				href="<%=request.getContextPath()%>/roles/delete?id=${item.id}"
				class="btn btn-sm btn-danger" data-loading-text="Loading"
				id="delBtn">刪除</a></td>
			<td>${item.name}</td>
		</tr>
	</c:forEach>
</table>

